var BS_POST = function(a, b, c, d) {
		jQuery.ajax({
			url: a,
			async: c,
			data: b,
			type: "post",
			dataType: "json",
			beforeSend: function() {},
			success: function(a) {
				d && jQuery.isFunction(d) && d(a)
			},
			complete: function(a, d) {},
			error: function(a, d, b) {}
		})
	},
	myDate = new Date;

function setCookie(a, b, c) {
	var d = new Date;
	d.setTime(d.getTime() + 864E5 * c);
	c = "expires=" + d.toUTCString();
	document.cookie = a + "=" + b + "; " + c
}

function getCookie(a) {
	a += "=";
	for (var b = document.cookie.split(";"), c = 0; c < b.length; c++) {
		for (var d = b[c];
			" " == d.charAt(0);) d = d.substring(1);
		if (-1 != d.indexOf(a)) return d.substring(a.length, d.length)
	}
	return ""
}

function clearCookie(a) {
	setCookie(a, "", -1)
}
var base = function() {
	function a(a) {
		alert(333);
		$("#dialog-message-alert span").html(a);
		$("#dialog-message-alert").dialog({
			resizable: !1,
			minHeight: "96px",
			modal: !0,
			closeOnEscape: !0,
			dialogClass: "ui-alert",
			position: {
				my: "center",
				at: "center",
				of: window,
				collision: "fit"
			},
			buttons: {
				base_confirm: function() {
					$(this).dialog("close")
				}
			}
		})
	}

	function b(a, b) {
		$("#dialog-message-alert-back span").html(a);
		$("#dialog-message-alert-back").dialog({
			resizable: !1,
			minHeight: "96px",
			modal: !0,
			closeOnEscape: !1,
			dialogClass: "ui-alert",
			position: {
				my: "center",
				at: "center",
				of: window,
				collision: "fit"
			},
			buttons: {
				base_confirm: function() {
					$(this).dialog("close");
					b.call()
				}
			}
		})
	}

	function c(a, b, c) {
		$("#dialog-message-confirm span").html(a);
		$("#dialog-message-confirm").dialog({
			resizable: !1,
			minHeight: "96px",
			modal: !0,
			closeOnEscape: !0,
			dialogClass: "ui-alert",
			position: {
				my: "center",
				at: "center",
				of: window,
				collision: "fit"
			},
			buttons: {
				base_confirm: function() {
					$(this).dialog("close");
					b && b.call()
				},
				base_cancle: function() {
					$(this).dialog("close");
					c && c.call()
				}
			}
		});
		$('[role="dialog"]').css("left", ($(window).width() - $('[role="dialog"]').width()) / 2 + "px")
	}
	return {
		yumAlert: function(b) {
			a(b)
		},
		yumAlertBack: function(a, c) {
			b(a, c)
		},
		yumConfirm: function(a, b, f) {
			c(a, b, f)
		},
		yumOpenLoading: function() {
			$("#dialog-loading").dialog({
				resizable: !1,
				minHeight: "96px",
				title: "",
				modal: !0
			})
		},
		yumCloseLoading: function() {
			$("#dialog-loading").dialog("close")
		},
		setAction: function(a, b, c, e) {
			a = requestContextPath + "/" + a;
			b = b || "post";
			c = "#" + (c || "mainForm");
			e = e || "_self";
			$(c).attr("action", a).attr("method",
				b).attr("target", e).submit()
		},
		addFavorite: function() {
			addFavorite()
		}
	}
}();
jQuery.extend({
	trimD: function(a) {
		return null == a ? a : a.replace(/^D(B|N)?/, "")
	},
	localStr: function(a, b) {
		if ("en_US" == locale) return a.en;
		if ("zh_CN" == locale) return 1 == b ? $.trimD(a.cn) : a.cn
	},
	isEnglish: function() {
		return "en_US" == locale ? !0 : !1
	},
	moneyFormat: function(a) {
		return a = $.isEnglish() ? pageMessage.yun + a : a + pageMessage.yun
	},
	showLoading: function(a, b, c) {
		$body = $("body");
		a = void 0 != a ? a :
			'<div class="zzsc6"><div class="bounce1"></div><div class="bounce2"></div><div class="bounce3"></div></div>';
		b = void 0 != b ? parseInt(b) :
			"90";
		c = void 0 != c ? parseInt(c) : "250";
		var d = "" + -(c / 2) + "px 0 0 " + -(b / 2) + "px";
		$body.stop().append('<div id="HLoading" style="width:' + b + "px;height:" + c + "px;line-height:" +
			c + "px;text-align:center;position:fixed;top:30%;left:50%;margin:" + d + ';">' + a +
			"</div>")
	},
	removeLoading: function() {
		$("#HLoading").hide()
	},
	showOverlay: function() {
		$body = jQuery("body");
		$body.stop().append(
			'<div id="overlay" style="background-color:black;position:absolute;top:0px;left:0px;width:500px;height:500px;filter:Alpha(opacity=30);opacity:0.3;z-index:10000"></div>'
			);
		jQuery("#overlay").height(document.body.scrollHeight);
		jQuery("#overlay").width(document.body.scrollWidth);
		jQuery("#overlay").fadeTo(200, .5);
		jQuery(window).scroll(function() {
			jQuery("#overlay").height(document.body.scrollHeight);
			jQuery("#overlay").width(document.body.scrollWidth)
		});
		jQuery(window).resize(function() {
			jQuery("#overlay").height(document.body.scrollHeight);
			jQuery("#overlay").width(document.body.scrollWidth)
		})
	},
	hideOverlay: function() {
		jQuery("#overlay").fadeOut(200)
	}
});
var common = function() {
		var a = /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/,
			b =
			/^(139|138|137|136|135|134|147|150|151|152|157|158|159|178|182|183|184|187|188|130|131|132|155|156|185|186|145|176|133|153|177|180|181|189|170)\d{8}$/,
			c = /^\d{3,4}$/,
			d = /^\d{7,8}$/,
			g = /^[0-9]*[1-9][0-9]*$/,
			f = /[0-9]/,
			e = "|;$;<;>;+;script;src;select;update;delete;insert;style;\x3c!--**--\x3e;/**;//**; **/;--**;/n*;/t*;*.*"
			.split(";"),
			h = /^[0-9a-zA-Z\.\-\_\u4e00-\u9fa5]{1,24}$/;
		return {
			isEmail: function(b) {
				return a.test($.trim(b))
			},
			isMobile: function(a) {
				return b.test($.trim(a))
			},
			isAreaCode: function(a) {
				return c.test($.trim(a))
			},
			isTelephone: function(a) {
				return d.test($.trim(a))
			},
			isNumber: function(a) {
				return g.test($.trim(a))
			},
			isNum: function(a) {
				return f.test($.trim(a))
			},
			isStr: function(a) {
				return h.test($.trim(a))
			},
			isStr2: function(a, b) {
				for (var c = !1, d = 0; d < e.length; d++)
					if (0 <= a.indexOf(e[d])) {
						c = !0;
						break
					} return c
			}
		}
	}(),
	yumCfg = {
		sid: "yum_sid",
		rememberUser: "yum_ueserInfo",
		myNotNeed: "yum_myNotNeed",
		orderFlag: "yum_order",
		payFlag: "yum_pay",
		keep: 7,
		STORE_STATUS_NOTOPEN: "0",
		STORE_STATUS_NORMAL: "1",
		STORE_STATUS_CLOSE: "2",
		STORE_STATUS_TEMPCLOSE: "3"
	};
String.prototype.format = function(a) {
	return this.replace(/\{(\d+)\}/g, function(b, c) {
		return a[c]
	})
};

function newGuid() {
	for (var a = "", b = 1; 32 >= b; b++) {
		var c = Math.floor(16 * Math.random()).toString(16),
			a = a + c;
		if (8 == b || 12 == b || 16 == b || 20 == b) a += "-"
	}
	return a
}

function showBrowser() {
	return 0 <= navigator.userAgent.indexOf("Opera") ? "opera" : 0 <= navigator.userAgent.indexOf("360SE") ? "360" :
		0 <= navigator.userAgent.indexOf("SE") ? "sougou" : 0 <= navigator.userAgent.indexOf("Firefox") ? "firefox" :
		0 <= navigator.userAgent.indexOf("Chrome") ? "chrome" : "false" != maxthonVersion() ? "maxthon" : 0 <= navigator
		.userAgent.indexOf("TencentTraveler") ? "txtt" : 0 <= navigator.userAgent.indexOf("Safari") ? "safari" : 0 <=
		navigator.userAgent.indexOf("Netscape") ? "netscape" : "ie"
}

function isMaxthon() {
	try {
		return window.external.max_invoke("GetHotKey"), !0
	} catch (a) {
		return !1
	}
}

function maxthonVersion() {
	return isMaxthon() ? window.external && window.external.max_version ? window.external.max_version.substr(0, 1) :
		"false" : "false"
}
$.serializeObject = function(a) {
	var b = {};
	$.each(a.serializeArray(), function(a) {
		b[this.name] = b[this.name] ? b[this.name] + "," + this.value : this.value
	});
	return b
};

function IsPC() {
	for (var a = navigator.userAgent, b = "Android;iPhone;SymbianOS;Windows Phone;iPad;iPod".split(";"), c = !0, d =
		0; d < b.length; d++)
		if (0 < a.indexOf(b[d])) {
			c = !1;
			break
		} return c
}
var baseUrl = "http://www.youtiy.com";
